<?php

defined('SYSPATH') or die('No direct access allowed.');

if (!Route::cache()) {
    Route::set('report/purchase', 'report/purchase(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'purchase',
                'action' => 'index',
    ));
    Route::set('newreport/currentstocks', 'newreport/currentstocks(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'newreport',
                'controller' => 'currentstocks',
                'action' => 'index',
    ));
    //报废品记录查询
    Route::set('report/waster', 'report/waster(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'waster',
                'action' => 'index',
    ));
    //产品销量统计
    Route::set('report/sale', 'report/sale(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'sale',
                'action' => 'index',
    ));
    //不良品库存统计
    Route::set('report/wasterstock', 'report/wasterstock(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'wasterstock',
                'action' => 'index',
    ));
    //在途库存明细下载
    Route::set('report/onway', 'report/onway(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'onway',
                'action' => 'index',
    ));
    //hzr数据
    Route::set('report/hzrvip', 'report/hzrvip(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'hzrvip',
                'action' => 'index',
    ));
    //银行卡丢失后更新账号
    Route::set('report/sufoolish', 'report/sufoolish(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'sufoolish',
                'action' => 'index',
    ));
    //产品库存支持天数查询
    Route::set('report/stockday', 'report/stockday(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'stockday',
                'action' => 'index',
    ));
    //缺货通报查询
    Route::set('report/outstock', 'report/outstock(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'outstock',
                'action' => 'index',
    ));
    //产品数据下载
    Route::set('report/skus', 'report/skus(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'skus',
                'action' => 'index',
    ));

    //订单追踪号查询报表
    Route::set('report/saleorders', 'report/saleorders(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'saleorders',
                'action' => 'index',
    ));

    //SKU最近十次采购明细下载
    Route::set('report/nearpurchase', 'report/nearpurchase(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'nearpurchase',
                'action' => 'index',
    ));
    //分仓在途库存查询
    Route::set('report/outlandonway', 'report/outlandonway(/<action>(/<id>))')
            ->defaults(array(
                'directory' => 'report',
                'controller' => 'outlandonway',
                'action' => 'index',
    ));
    //缺货订单报表
    Route::set('shortage', 'shortage(/<action>(/<id>))')
            ->defaults(array(
                'controller' => 'shortage',
                'action' => 'index',
    ));
}


//权限设置
//报废品记录查询 
ACL::set('Report', array(
    'purchase report' => array(
        'title' => __('采购明细+采购统计报表+下载'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'newreport purchaseorderdetails' => array(
        'title' => __('采购明细新报表'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'newreport purchaseorderdetails' => array(
        'title' => __('日结库存查询'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'purchase report' => array(
        'title' => __('采购明细+采购统计报表+下载'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'shortage report' => array(
        'title' => __('缺货订单报表+下载'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'sale report' => array(
        'title' => __('月销售统计报表'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'waster report' => array(
        'title' => __('废品仓库成本明细'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'buhegestock report' => array(
        'title' => __('不良品库存统计'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'onway' => array(
        'title' => __('在途库存明细'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'stockday' => array(
        'title' => __('产品库存支持天数查询'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'outstock' => array(
        'title' => __('缺货通报查询'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'skus' => array(
        'title' => __('产品数据下载'),
        'restrict access' => TRUE,
        'description' => ''
    ),
    'saleorders report' => array(
        'title' => __('订单追踪号报表'),
        'restrict access' => TRUE,
        'description' => ''
    ),
));
